Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
page.tsx1.3 kB
import { z } from "zod"; import { threadGet } from "@/api/openapi-server/threads"; import { UnreadyBanner } from "@/components/site/Unready"; import { getSettings } from "@/lib/settings/settings-server"; import { ThreadScreen } from "@/screens/thread/ThreadScreen/ThreadScreen"; export type Props = { params: Promise<{ slug: string; }>; searchParams: Promise<Query>; }; const QuerySchema = z.object({ page: z .string() .transform((v) => parseInt(v, 10)) .optional(), }); type Query = z.infer<typeof QuerySchema>; export default async function Page(props: Props) { const { slug } = await props.params; const searchParams = await props.searchParams; const { page } = QuerySchema.parse(searchParams); const { data } = await threadGet(slug); return <ThreadScreen initialPage={page} slug={slug} thread={data} />; } export async function generateMetadata(props: Props) { const params = await props.params; try { const settings = await getSettings(); const { data } = await threadGet(params.slug); return { title: `${data.title} | ${settings.title}`, description: data.description, }; } catch (e) { return { title: "Thread Not Found", description: "The thread you are looking for does not exist.", }; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server